package com.zcf.controller;


import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zcf.common.json.Body;
import com.zcf.pojo.Notic;
import com.zcf.service.NoticServiceImpl;
import com.zcf.vo.out.LayuiJson;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ZhaoQi
 * @since 2019-03-18
 */
@CrossOrigin
@Controller
@RequestMapping("/notics")
public class NoticController {
	@Autowired
	NoticServiceImpl NoticServiceImpl;
	/**
	 * 前端获取公告
	 * @return
	 */
	@PostMapping("getnotic")
	@ResponseBody
	public Body getnotic(){
		return NoticServiceImpl.getnotic();
	}
	/**
	 * 前端获取充值提示
	 * @return
	 */
	@PostMapping("getbuynotic")
	@ResponseBody
	public Body getbuynotic(){
		return NoticServiceImpl.getbuynotic();
	}
	/**
	 * 前端获取消息公告
	 * @return
	 */
	@PostMapping("getmessage")
	@ResponseBody
	public Body getmessage(){
		return NoticServiceImpl.getmessage();
	}
	
	/**
	 * 后端获取公告
	 * @return
	 */
	@PostMapping("getnotics")
	@ResponseBody
	public LayuiJson getnotics(){
		return NoticServiceImpl.getnotics();
	}
	/**
	 * 后端获取公告
	 * @return
	 */
	@PostMapping("getNotic")
	@ResponseBody
	public LayuiJson getNotic(){
		return NoticServiceImpl.getNotic();
	}
	
	/**
	 * 后端获取快捷用语
	 * @return
	 */
	@PostMapping("getNotics")
	@ResponseBody
	public LayuiJson getNotics(){
		return NoticServiceImpl.getNotics();
	}
	
	/**
	 * 后端获取公告
	 * @return
	 */
	@PostMapping("getannouncement")
	@ResponseBody
	public LayuiJson getannouncement(){
		return NoticServiceImpl.getannouncement();
	}
	/**
	 * 前端获取快捷用语
	 * @return
	 */
	@PostMapping("getKnotics")
	@ResponseBody
	public Body getKnotics(){
		return NoticServiceImpl.getKnotics();
	}
	
	/**
	 * 修改公告
	 * @return
	 */
	@PostMapping("updatenotic")
	@ResponseBody
	public Body updatenotic(Notic notic){
		return NoticServiceImpl.updatenotic(notic);
	}
	
	/**
	 * 添加快捷用语
	 * @param mall
	 * @return
	 */
	@PostMapping("add")
	@ResponseBody
	public Body add(Notic notic){
		return NoticServiceImpl.add(notic);
	}
	
	/**
	 * 删除快捷用语
	 * @param mall
	 * @return
	 */
	@PostMapping("delete")
	@ResponseBody
	public Body delete(Notic notic){
		return NoticServiceImpl.delete(notic);
	}
	
}

